import autoImport from 'unplugin-auto-import/vite';

export default function createAutoImport(path) {
  return autoImport({
    imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
    eslintrc: {
      enabled: true, // Default `false`
      filepath: path.resolve(__dirname, './.eslintrc-auto-import.json'), // Default `./.eslintrc-auto-import.json`
      globalsPropValue: true, // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
    },
    dts: 'types/auto-imports.d.ts',
  });
}
